Conversation
patrickbrouwers
commented
Jul 4, 2017
e2e1441 to
d3487ef
Compare
|
|
||
| if (!preg_match('(^phar:)i', $sourceFile)) { | ||
| $sourceFile = realpath($sourceFile); | ||
| } |
There was a problem hiding this comment.
@patrickbrouwers I don't like this strategy, because it depends on those files not being previously loaded. I don't know what would happen with opcache, for example.
I think we talked about this in the previous PR.
I'd agree to merge as-is, but I wouldn't trust this strategy for my projects.
There was a problem hiding this comment.
This is actually copy pasted from the AnnotationsDriver.
| $includedFiles[] = $sourceFile; | ||
| } | ||
|
|
||
| $declared = get_declared_classes(); |
There was a problem hiding this comment.
@patrickbrouwers this list could be huge. We could use some convention to skip building a ReflectionClass for each loaded class in the system... Or maybe parse filename and class name and only reflect on basename matches.
There was a problem hiding this comment.
But that would require people to actually have a ...Mapping.php suffix.
Like previous comment, this is also the way the AnnotationsDriver does things. It's cached in production anyway.
f6c1573 to
955ea6e
Compare
955ea6e to
eee1bfc
Compare